package bruce.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.annotation.WebListener;

/**
 * @service 监听器
 * @description 监听器配置方案1
 * @author: Bruce
 * @create: 2019-12-23
 **/
@WebListener
public class RequestListenter implements ServletRequestListener {

    private Logger log = LoggerFactory.getLogger(this.getClass());

    @Override
    public void requestDestroyed(ServletRequestEvent servletRequestEvent) {

        log.info("---------------------------->servlet请求销毁监听");
    }

    @Override
    public void requestInitialized(ServletRequestEvent servletRequestEvent) {

        log.info("---------------------------->servlet请求创建监听");
    }
}
